package Lecture7;

import java.util.Scanner;

public class Fibonachi {

	public static void main(String[] args)

	{
		Scanner sc = new Scanner (System.in);
		System.out.println("Enter a number for Fibonachi sequence");
		int  n = sc.nextInt();
		
		System.out.println("The " + n + " number of Fibonachi sequence is " + fibonacci(n));
	}
	
		public static int fibonacci(int number) 
		{
		    if ((number == 0) || (number == 1)) 
		    {
		      return number;
		    }
		    else
		    {
		      return fibonacci(number - 1) + fibonacci(number - 2);
		    }
		}

		   
	

}
